<template>
  <div :style="styleA">
    品牌名称：<input type="text" placeholder="请输入搜索条件" @input="search" />
  </div>
</template>

<script>
export default {
  data() {
    return {
      styleA: {
        border: "1px solid black",
        margin: "10px 0px 0px 0px",
        textAlign: "center",
        padding: "2px",
        backgroundColor: "skyblue",
        fontWeight: "bold",
      },
    };
  },
  methods: {
    search(e) {
      // 发布事件
      this.$bus.$emit("search", e.target.value);
    },
  },
};
</script>